//
// Created by juno on 2021/9/7.
//

#ifndef WEBCHART_ROOM_HTTP_H
#define WEBCHART_ROOM_HTTP_H

#include <libwebsockets.h>

struct http_ep_info {
    char *token;
    int valid;
    pthread_spinlock_t lock;
    pthread_t tid;
    int running;
};

struct pss {
    struct lws_spa *spa;
};

struct persion {
    int id;
    char *name;
    struct persion *lp;
    struct persion *rp;
    struct persion *parent;
};

struct chart_room {
    int id;
    char *name;
    struct persion *persion;
    struct chart_room *lp;
    struct chart_room *rp;
    struct chart_room *parent;
};

int http_cb(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len);

#endif //WEBCHART_ROOM_HTTP_H
